package com.kaili.common.exports;

import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import com.kaili.common.exports.base.BaseExport;
import com.kaili.common.exports.base.ExportNotice;
import com.kaili.db.service.IHsEwbsDispatchService;
import com.kaili.pojo.vo.DispatchVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @AUTHOR pengdongxu.
 * @Date: 18-5-29 下午1:39.
 * @COPYRIGHT 杭州凯立
 */
@ExportNotice(name = "派件查询导出")
@Component
public class ExportDispatchqueryList extends BaseExport {

    @Autowired
    private IHsEwbsDispatchService hsEwbsDispatchService;

    @Override
    public HashMap doExport(Map parm) {
        HashMap map = new HashMap();
        map.put(NormalExcelConstants.CLASS, DispatchVO.class);
        List<DispatchVO> list = hsEwbsDispatchService.exportDispatchQueryList(parm);
        map.put(NormalExcelConstants.DATA_LIST,list);
        return map;
    }
}
